<script setup>
import { ref,onMounted } from "vue"
import {useRoute} from "vue-router" 
import axios from "axios"
import { router } from "../../../router"

const route = useRoute()

onMounted(()=>{
    document.title = "更换头像- EvenSO"
})

const myImage = ref(route.query.image)

const goToImage = () => {
    router.go(-1)
}


</script>

<template>
    <div class="myImageAllBox">
        <div class="myTitleBox">
            <div class="shuXian"></div>
            <span @click="goToImage" class="myTitleImage">我的头像</span>
            <span>{{ ">更改头像" }}</span>
        </div>
        <div class="myMasterBox">
            <div class="uploadFunc">
                <div class="upload1Box"></div>
                <div class="upload2Box"></div>
            </div>
            <div class="xian1"></div>
            <div class="myImageBox">
                <img :src="myImage" alt
                 />
            </div>
        </div>
    </div>
</template>

<style scoped>
.myImageAllBox{
    width: 100%;
    height: 100%;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}
.shuXian{
    position: absolute;
    left: 20px;
    top: 10px;
    width: 5px;
    height: 15px;
    background: rgb(0,160,216);
    border-radius: 50px;
}
.myTitleImage:hover{
    cursor: pointer;
    color: rgb(0,160,216);
}
.myTitleBox{
    position: absolute;
    left: 168px;
    top: 10px;
    width: 85%;
    height: 8.5%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.myTitleImage{
    position: absolute;
    left: 35px;
    top: 7px;
    color: rgba(0, 0, 0, 0.5);
}
.myTitleBox span:nth-child(3){
    position: absolute;
    left: 105px;
    top: 7px;
}
.myMasterBox{
    position: absolute;
    left: 15%;
    top: 10%;
    width: 85%;
    height: 50%;
    display: flex;
}
.uploadFunc{
    position: absolute;
    left: 7%;
    top: 10%;
    width: 40%;
    height: 80%;
}
.xian1{
    position: absolute;
    left: 49%;
    top: 15%;
    width: 0.2%;
    height: 72%;
    border-radius: 50px;
    background-color: rgba(200, 200, 200, 0.3);
}
.myImageBox{
    position: absolute;
    right: 2%;
    top: 10%;
    width: 45%;
    height: 72%;
}
.upload1Box{
    position: absolute;
    left: 30%;
    top: 7%;
    width: 60%;
    height: 35%;
    border-radius: 10px;
    background: rgb(241,242,245);
}
.upload2Box{
    position: absolute;
    left: 30%;
    top: 60%;
    width: 60%;
    height: 35%;
    border-radius: 10px;
    background: rgb(241,242,245);
}
.myImageBox{
    position: absolute;
    right: 20%;
    width: 15%;
    height: 40%;
    border-radius: 50%;
}
.myImageBox img{
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

</style>